package com.kx.smsplantform.client;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.Map;
import java.util.Set;

@FeignClient(value = "SMSPLATFORM-CACHE")
public interface CacheClient {
    //获取所有的key
    @GetMapping(value = "/cache/hgetkeys/{pattern}")
    Set<String> hGetKeys(@PathVariable String pattern);


    //通过key获取所有的键值对
    @RequestMapping(value = "/cache/hmget/{key}", method = RequestMethod.GET)
    Map hMGet(@PathVariable("key") String key);


}
